#include <iostream>
#include <string>
using namespace std;

int main()
{
	int a[26] = {1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,4,1,2,3,1,2,3,4};
	string s;
	getline(cin, s);
	int sum = 0;
	for(auto e : s)
	{
		if(e == ' ')
			sum += 1;
		else
			sum += a[e - 'a'];
	}
	cout << sum << endl;
	return 0;
}
